package com.jasmine.bjstkserver.server.folder.model;

import java.util.List;

/**
 * @author jasmineXz
 */
public class FolderReq {
    private Integer userId;
    private Integer folderId;  // id
    private Integer folderPid; // 父id
    private Integer type;
    private String name;
    private String uploadPath; // 上传地址
    private Integer lockState; // 锁定标识 0:未锁定;1:锁定;

    private List<Integer> folderIds;  // 文件夹Id集合

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getFolderId() {
        return folderId;
    }

    public void setFolderId(Integer folderId) {
        this.folderId = folderId;
    }

    public Integer getFolderPid() {
        return folderPid;
    }

    public void setFolderPid(Integer folderPid) {
        this.folderPid = folderPid;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public List<Integer> getFolderIds() {
        return folderIds;
    }

    public void setFolderIds(List<Integer> folderIds) {
        this.folderIds = folderIds;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUploadPath() {
        return uploadPath;
    }

    public void setUploadPath(String uploadPath) {
        this.uploadPath = uploadPath;
    }

    public Integer getLockState() {
        return lockState;
    }

    public void setLockState(Integer lockState) {
        this.lockState = lockState;
    }

    public static FolderReqBuilder builder () {
        return new FolderReqBuilder();
    }

    public static final class FolderReqBuilder {
        private Integer userId;
        private Integer folderId;         // id
        private Integer folderPid;        // 父id
        private Integer type;             // 文件夹类型 1:图片 2:文章
        private String name;              // 文件夹名称
        private String uploadPath;        // 上传地址
        private Integer lockState;        // 锁定标识 0:未锁定;1:锁定;
        private List<Integer> folderIds;  // 文件夹Id集合

        private FolderReqBuilder() {
        }


        public FolderReqBuilder userId(Integer userId) {
            this.userId = userId;
            return this;
        }

        public FolderReqBuilder folderId(Integer folderId) {
            this.folderId = folderId;
            return this;
        }

        public FolderReqBuilder name(String name) {
            this.name = name;
            return this;
        }

        public FolderReqBuilder uploadPath(String uploadPath) {
            this.uploadPath = uploadPath;
            return this;
        }

        public FolderReqBuilder folderPid(Integer folderPid) {
            this.folderPid = folderPid;
            return this;
        }

        public FolderReqBuilder type(Integer type) {
            this.type = type;
            return this;
        }

        public FolderReqBuilder folderIds(List<Integer> folderIds) {
            this.folderIds = folderIds;
            return this;
        }

        public FolderReqBuilder lockState(Integer lockState) {
            this.lockState = lockState;
            return this;
        }


        public FolderReq build() {
            FolderReq folderReq = new FolderReq();
            folderReq.setUserId(userId);
            folderReq.setFolderId(folderId);
            folderReq.setFolderPid(folderPid);
            folderReq.setName(name);
            folderReq.setUploadPath(uploadPath);
            folderReq.setType(type);
            folderReq.setLockState(lockState);
            folderReq.setFolderIds(folderIds);
            return folderReq;
        }
    }
}
